package com.marion.ddd.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;
import java.io.Serializable;

/**
 * 转账记录(TAccountRecord)实体类
 *
 * @author makejava
 * @since 2021-12-04 11:38:55
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Table(name = "t_account_record")
@DynamicInsert
@DynamicUpdate
public class AccountRecordEntity implements Serializable {
    private static final long serialVersionUID = 581828900217302593L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * 用户UID
     */
    private Long fromUid;
    /**
     * 用户UID
     */
    private Long toUid;
    /**
     * 转账类型 0-转账 1-入账
     */
    private Integer type;
    /**
     * 金额
     */
    private Long amount;
    /**
     * 转账方余额
     */
    private Long fromRemain;
    /**
     * 收账方余额
     */
    private Long toRemain;
    /**
     * 创建时间
     */
    private Date createAt;
    /**
     * 更新时间
     */
    private Date updatedAt;
    /**
     * 是否删除 0-否 1-是
     */
    private Integer isDeleted;

}

